package com.whmall.service.crm.module.companybusinesslicense.service;

import com.whmall.service.crm.entity.dto.companybusinesslicense.BusinessLicenseQueryReqDTO;
import com.whmall.service.crm.entity.dto.companybusinesslicense.CompanyBusinessLicenseRspDTO;
import com.whmall.service.crm.entity.dto.companybusinesslicense.CreateCompanyBusinessLicenseReqDTO;
import com.whmall.service.crm.entity.dto.companybusinesslicense.UpdateCompanyBusinessLicenseReqDTO;
import java.util.List;

/**
 * Author：yangdong
 * Date：2020/8/3
 * Description：营业执照业务层
 */
public interface CompanyBusinessLicenseService {

    List<CompanyBusinessLicenseRspDTO> selectBy(BusinessLicenseQueryReqDTO queryReqDTO);

    CompanyBusinessLicenseRspDTO getById(Long id);

    int insert(CreateCompanyBusinessLicenseReqDTO createCompanyBusinessLicenseReqDTO);

    int update(UpdateCompanyBusinessLicenseReqDTO updateCompanyBusinessLicenseReqDTO);

    /**
     * 有效记录数，用来查重
     * @param id
     * @param companyId
     * @param socialCreditCode
     * @return
     */
    int countEffective(Long id, Long companyId, String socialCreditCode);

    /**
     * 根据证照有效期重新验证有效性
     */
    void revalidateEffective();
}
